package com.shadow.bus.main.work;

import com.alibaba.fastjson.TypeReference;
import com.shadow.bus.entity.OperationEntity;
import com.tepth.shadow.ui.recycler.ObjConverter;

import java.util.ArrayList;

/**
 * @author zhangyu
 * @date 2018/7/4
 */

public class OperatorDataConverter {
    public ArrayList<OperationEntity> converter(String response) {
        ArrayList<OperationEntity> busTypeEntities = new ArrayList<>();
        try {
            busTypeEntities = new ObjConverter<ArrayList<OperationEntity>>().
                    convert(response, new TypeReference<ArrayList<OperationEntity>>() {
                    });
        } catch (Exception e) {
            e.printStackTrace();
        }
        return busTypeEntities;
    }
}
